package com.bafa.front.admin;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.bafa.exceptions.ErrorException;
import com.bafa.front.DaddyServlet;
import com.bafa.front.postlogon.PostLogonServlet;
import com.bafa.front.utils.FrontUtils;
import com.bafa.objects.AdminUser;
import com.bafa.objects.User;
import com.bafa.services.scorers.FunctionalScorerServices;

public class DeleteScorerServlet extends PostLogonServlet {

	@Override
	public void doPostLogonEvent(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, ErrorException {
		HttpSession session = request.getSession();
		
			User user = (User)FrontUtils.getUser(request);
			int matchId = new Integer(request.getParameter("matchId")).intValue();
			String scorerName = request.getParameter("scorer").replaceAll("%20"," ");
			
			
			message = FunctionalScorerServices.deleteScorer(scorerName,matchId,user.getTeamId());
			
			url = "viewmatchreport.bafa";
		
		
	}
}
